{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import pdfplumber\n",
    "\n",
    "fileUrl = R\"https://oss-yangjh.oss-cn-chengdu.aliyuncs.com/data/csv/600519.csv\"\n",
    "\n",
    "df_600519 = pd.read_csv(fileUrl,nrows=7)\n",
    "pdf = pdfplumber.open(R'data\\2022comdesigngamelist.pdf')\n",
    "table = []\n",
    "for i in range(len(pdf.pages)):\n",
    "    if(i+1)<len(pdf.pages):\n",
    "      page = pdf.pages[i + 1]\n",
    "      table.extend(page.extract_table())\n",
    "pd.DataFrame(table,columns=('学校','项目名称','大类','参赛学生','指导教师')).to_csv('2022年西北赛区推送国赛名单.csv',)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.8.10 64-bit",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "9650cb4e16cdd4a8e8e2d128bf38d875813998db22a3c986335f89e0cb4d7bb2"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
